package com.slkj.shilixiaoyuanapp.entity;

import com.chad.library.adapter.base.entity.MultiItemEntity;

/**
 * Created  on 2018-07-15
 *
 * @author 唐开阔
 * @describe 分组有头部的RecyclerView基类实体
 */
public abstract class BaseRecycHeadEntity implements MultiItemEntity {
    public static final int TYPE_ITEN = 1;
    public static final int TYPE_HEAD = 2;
    private boolean isHead;

    public BaseRecycHeadEntity(boolean isHead) {
        this.isHead = isHead;
    }

    public boolean isHead() {
        return isHead;
    }

    public void setHead(boolean head) {
        isHead = head;
    }
    @Override
    public int getItemType() {
        return isHead ? TYPE_HEAD : TYPE_ITEN;
    }
}
